CC=g++

#CC_STANDARD=
CC_STANDARD=-std=c++11

LINKFLAGS=-lwiringPi $(CC_STANDARD) -lpthread

CFLAGS=-c -g $(CC_STANDARD)


all:gpioSwitch 

gpioSwitch:gpioSwitch.o main.o TemHum.o
	$(CC) $^ -o $@ $(LINKFLAGS)
temperature:temperature.o temperature.h
	$(CC) $^ -o $@ $(LINKFLAGS) -lbcm2835

%.o:%.cpp
	$(CC) $(CFLAGS) -o $@ $< 

.PHONY:
	clean
clean:
	rm -f ds server client *.o temperature
